package interpreter;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author Elise
 */
public class RaizQuadrada extends AbstractExpression {

    private AbstractExpression a;

    /**
     * @return the esq
     */
    RaizQuadrada(AbstractExpression a) {
        this.a = a;
    }

    @Override
    public float getResultado() {
        return (float) Math.sqrt(a.getResultado());
    }

    public AbstractExpression getA() {
        return a;
    }

    /**
     * @param esq the esq to set
     */
    public void setA(AbstractExpression a) {
        this.a = a;
    }
}
